#ifndef _MUTEX_H_
#define _MUTEX_H_

/* Locks mutex. Exits program on any error. */ 
void mutex_lock(int semaphore_id);

/* Unlocks mutex. Exits program on any error. */ 
void mutex_unlock(int semaphore_id);

/* Creates a mutex, returns its id. Exits program on any error. */ 
int mutex_create();

/* Creates a mutex, returns its id or -1 if error. */
int unsafe_mutex_create();

/* Destroys mutex. Exits program on any error. */ 
void mutex_destroy(int semaphore_id);


#endif

